package com.bjsxt.utils;

import com.bjsxt.service.SurveyServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@EnableScheduling
public class ScheduleTask {

    @Autowired
    private SurveyServer surveyServer;


//        @Scheduled(cron = "* */1  * * * ?")
    @Scheduled(fixedRate = 120000)
    public void state() {
        System.out.println("updateState....");
        surveyServer.updateState();
    }

}
